#include"Task.hpp"
#include"threadpool.hpp"
#include<time.h>
#include<unistd.h>
int main(){
    srand(time(nullptr));
    //Threadpool<Task>*tp=new Threadpool<Task>();
    Threadpool<Task>::GetInstance()->start();
    while(true)
    {
        int x=rand()%10+1;
        int y=rand()%10+1;
        int len=opers.size();
        int op=rand()%len;
        char per=opers[op];
        Task t(x,y,per);
        Threadpool<Task>::GetInstance()->push(t);
        std::cout << "main thread make task: " << t.getTask() << std::endl;
        sleep(1);
    }
}